package com.ruibang.glass.quality.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.common.utils.validateannotation.NotBlank;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-08-30  10:47
 * @Description: TODO：每日判废缺陷信息
 * @Version: 1.0
 */

@Data
@TableName("g_everyday_discard_defect")
public class EverydayDiscardDefect {

    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("判废时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    @NotNull(message = "判废时间不可为空")
    private LocalDate discardDate;

    @ApiModelProperty("气泡判废数")
    private int bubbleDiscardNum;

    @ApiModelProperty("开口气泡判废数")
    private int openBubbleDiscardNum;

    @ApiModelProperty("结石判废数")
    private int stoneDiscardNum;

    @ApiModelProperty("铂金判废片数")
    private int platinumDiscardNum;

    @ApiModelProperty("成品检查数")
    private int checkNum;

    @ApiModelProperty("气泡判废率")
    private float bubbleDiscardRate;

    @ApiModelProperty("开口气泡判废率")
    private float openBubbleDiscardRate;

    @ApiModelProperty("结石判废率")
    private float stoneDiscardRate;

    @ApiModelProperty("铂金判废率")
    private float platinumDiscardRate;

    @ApiModelProperty("检查机code")
    @NotBlank(message = "检查机不可为空")
    private String checkMachineCode;
    //反投数
    private int investmentNum;
}
